package com.maimao.goods.client;

import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.core.model.resp.Result;
import com.maimao.goods.client.factory.SysUserFallBackFactory;
import com.maimao.goods.client.factory.UserFallBackFactory;
import com.maimao.model.user.input.SysUserByResourceInput;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Set;

/**
 * @author MaoLin Wang
 * @date 2020/12/22 7:54 下午
 */
@RequestMapping("/sys/user")
@FeignClient(contextId = "sysUserClient", value = ServiceContainer.USER_SERVICE, fallbackFactory = SysUserFallBackFactory.class, configuration = FeignInterceptor.class)
public interface SysUserClient {

    /**
     * 查询指定数量资源权限所有者的id
     */
    @PostMapping("/queryByResource")
    Result<Set<Integer>> queryByResource(@RequestBody SysUserByResourceInput input);
}
